package com.greenold.residing.service.impl;

import java.util.List;

import com.greenold.residing.domain.Room;
import com.greenold.residing.domain.RoomDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.greenold.residing.mapper.RoomMapper;
import com.greenold.residing.service.IRoomService;

/**
 * 床位房型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-15
 */
@Service
public class RoomServiceImpl implements IRoomService 
{
    @Autowired
    private RoomMapper roomMapper;


    /**
     * 查询床位房型列表
     * 
     * @param floorId 床位房型
     * @return 床位房型
     */
    @Override
    public List<RoomDTO> selectRoomList(String floorId)
    {
        return roomMapper.selectRoomList(floorId);
    }

    /**
     * 新增床位房型
     * 
     * @param room 床位房型
     * @return 结果
     */
    @Override
    public int insertRoom(Room room)
    {
        return roomMapper.insertRoom(room);
    }

    /**
     * 修改床位房型
     * 
     * @param room 床位房型
     * @return 结果
     */
    @Override
    public int updateRoom(Room room)
    {
        return roomMapper.updateRoom(room);
    }

    /**
     * 批量删除床位房型
     * 
     * @param ids 需要删除的床位房型主键
     * @return 结果
     */
    @Override
    public int deleteRoomByIds(String[] ids)
    {
        return roomMapper.deleteRoomByIds(ids);
    }

    /**
     * 删除床位房型信息
     * 
     * @param id 床位房型主键
     * @return 结果
     */
    @Override
    public int deleteRoomById(String id)
    {
        return roomMapper.deleteRoomById(id);
    }
}
